package com.ananjt.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author chenanhai
 * @since 2020-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sp_menu")
public class SpMenu extends Model<SpMenu> {

    private static final long serialVersionUID = 1L;

    private String id;

    private String name;

    private String menuUrl;

    private String permission;

    private String parentId;

    private LocalDateTime createDate;

    private String method;

    private String menuIcon;

    private String remark;

    private LocalDateTime updateDate;

    private Integer deleteFlag;

    private String createBy;

    private String updateBy;

    @TableField(exist = false)
    private List<SpMenu> children;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
